﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Trangtrai.CauhinhController;

namespace Trangtrai.cauhinhsanxuat
{
    public partial class AoChuan : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                if (cbxAoCode.SelectedIndex > -1)
                {
                    tbxAoName.Text = AoChuanController.GetSelectAoName(cbxAoCode.Text);
                }
            }
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            AoChuanController.InsertAoChuan(tbxAoChuanCode.Text, tbxAoChuanName.Text,cbxAoCode.Text,cbxSeason.Text);
            Response.Redirect("~/cauhinh/AoChuan.aspx");
        }
    }
}
